package com.stylefeng.guns.core.excel;

import java.util.HashMap;
import java.util.Map;

import com.google.common.base.Strings;


public class ExcleMappings {

	private Map<String,ExcelMapping> mappings = new HashMap<String,ExcelMapping>();
	
	public Map<String, ExcelMapping> getMappings() {
		return mappings;
	}
	
	public void put(String propertyName,ExcelMapping mapping) throws Exception{
		if(Strings.isNullOrEmpty(propertyName) || null == mapping || this.mappings.containsKey(propertyName))
			throw new RuntimeException("put mapping error!");
		this.mappings.put(propertyName, mapping);
	}
}
